package duylinh

class SanPham implements Serializable {

    // vd: chia, ban le
    LoaiSanPham loaiSanPham

    // 4092, 4093
    String code

    VatLieu vatLieu

    // hang muc nao
    String hangMuc

    Double dodayMin
    Double dodayMax

    Double trongLuong
    String trongLuongDonvi

    String avatarUrl

    // ghi chu them ve san pham
    String ghiChu

    DonviSanPham donviSanPham

    Double priceBeforeTax
    String currency

    // cong nghe dang dung
    CongNghe congNghe

    User creator
    User updater

    Date dateCreated
    Date lastUpdated


    // khach hang chinh
    KhachHang khachHangChinh

    static constraints = {
        loaiSanPham nullable: true
        creator nullable: true
        updater nullable: true
        currency nullable:true
        priceBeforeTax nullable: true

        lastUpdated nullable: true
        donviSanPham:true

        code unique: true, size: 1..20
        vatLieu nullable: true
        congNghe nullable: true
        khachHangChinh nullable: true
        dodayMin nullable: true
        dodayMax nullable: true
        avatarUrl nullable: true
    }
}
